﻿using System;
using System.Windows.Input;
using Mandarine.Navifation;

namespace DataBindApp1.Command
{
    /*
    public class NavigateCommand : RelayCommand<PhoneApplicationPage>
    {
        public NavigateCommand() 
        : base(
            a => a.NavigationService.Navigate(new Uri("/Settings.xaml", UriKind.Relative))
            )
        {}
    }
    */

    public class NavigateCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;
        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
            logger.Info("Navigated to Settings.xaml");
            var n = new Navigator();
            n.NavigateTo(@"/Settings.xaml");
        }
    }
}
